package com.api.zszsj2.ZYT.util.enums;

public enum LeaveTypeEnum {
    annualLeave("annualLeave", "年假")
    , paidCompassionateLeave("paidCompassionateLeave", "带薪事假")
    , paidSickLeave("paidSickLeave", "带薪病假")
    , vacationLeave("vacationLeave", "调休")
    , compassionateLeave("compassionateLeave", "事假")
    , sickLeave("sickLeave", "病假")
    , maternityLeave("maternityLeave", "产假")
    , paternityLeave("paternityLeave", "陪产假")
    , marriageLeave("marriageLeave", "婚假")
    , funeralLeave("funeralLeave", "丧假")
    , breastfeedingLeave("breastfeedingLeave", "哺乳假")
    , careLeave("careLeave", "护理假")
    , inpatientCareLeave("inpatientCareLeave", "住院护理假")
    , parentalLeave("parentalLeave", "育儿假")
    , vacationLeaveZB("vacationLeaveZB", "值班调休")
    , homeLeave("homeLeave", "探亲假")
    , other("other", "其他")

    ;
    // 成员变量
    private String type;
    private String name;
    // 构造方法
    private LeaveTypeEnum(String type, String name ) {
        this.name = name;
        this.type = type;
    }
    // 普通方法
    public static String getName(String type) {
        for (LeaveTypeEnum c : LeaveTypeEnum.values()) {
            if (c.getType().equals(type)) {
                return c.name;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
